//
//  CellView.swift
//  APIEndPoint
//
//  Created by Alfred on 2021/2/7.
//

import SwiftUI

struct CellView: View {
    
    var userModel: UserModel?
    let dic:[String:String] = ["key":"bbb","value":"some"]
    
    var body: some View {
        ForEach((self.userModel?.get()) ?? [dic,dic,dic,dic], id: \.self) { one in
            HStack(alignment: .bottom) {
                Text("\(one["key"]!): ")
                    .frame(width: 80, alignment: .leading)
                Text("\(one["value"]!)")
            }
        }
    }
}

struct CellView_Previews: PreviewProvider {
    static var previews: some View {
        CellView()
    }
}
